<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

Route::get('map','Index/map');
Route::get('baiduMap','Index/baiduMap');
Route::get('company_about','Index/company_about');
Route::get('user_agree','Index/user_agree');
Route::get('oss','Oss/index');

//Route::domain('it','backstage'); //绑定域名

//Route::domain('backstage',function(){

    //后台
    Route::group('backstage', function () {

        Route::rule('login', 'Index/login');//登录
        Route::rule('verify', 'Index/verify');//验证码
        Route::get('test','Index/test');

        Route::group('', function(){  //登录中间件
            Route::get("", 'Index/index');
            Route::rule('index', 'Index/index');
            Route::rule('welcome', 'Index/welcome');
            Route::rule('unicode', 'Index/unicode');
            Route::get('service','index/service');

            Route::group('', function(){  //权限中间件
                
                Route::resource('auth','Auth');  //权限管理
                Route::post('auth/delete_all','Auth/deleteAll');
            
                Route::resource('role','Role');  //角色管理
                Route::post('role/delete_all','role/deleteAll');
            
                Route::resource('admin','Admin');  //管理员管理
                Route::post('admin/delete_all','admin/deleteAll');
                Route::post('admin/change_status','admin/change_status');
                Route::get('admin/recycle','admin/recycle'); //回收站
                Route::post('admin/restore','admin/retore'); //还原


                Route::get('resource/image_folder','Resource/image_folder');  //图片文件夹页面
                Route::get('resource/folder_list','Resource/folder_list');    //获取文件夹列表
                Route::rule('resource/create_folder/:folder_type','Resource/create_folder');  //创建文件夹
                Route::rule('resource/update_folder_name','Resource/update_folder_name');  //修改文件夹名称
                Route::rule('resource/delete_folder','Resource/delete_folder');  //删除文件夹
                Route::rule('resource/upload_image','Resource/upload_image');  //上传图片
                Route::rule('resource/upload_image_all','Resource/upload_image_all');  //批量上传图片
                Route::get('resource/image_list','Resource/image_list');  //图片列表
                Route::get('resource/image_select_list','Resource/image_select_list');  //图片列表
                Route::rule('resource/delete','Resource/delete');  //删除
                Route::rule('resource/delete_all','Resource/delete_all');  //批量删除


                Route::resource('newhouse','Newhouse');  //新楼盘
                Route::post('newhouse/delete_all','Newhouse/delete_all');

                Route::resource('resoldhouse','Resoldhouse');  //二手房管理
                Route::post('resoldhouse/delete_all','Resoldhouse/delete_all');

                Route::resource('renthouse','Renthouse');  //二手房管理
                Route::post('renthouse/delete_all','Renthouse/delete_all');

                Route::resource('store','Store');  //家居、装修店铺
                Route::post('store/delete_all','Store/delete_all');

                Route::resource('overseasregion','Overseasregion');  //海外地区管理
                Route::post('overseasregion/delete_all','Overseasregion/delete_all');

                Route::resource('overseashouse','Overseashouse');  //海外地区房源
                Route::post('overseashouse/delete_all','Overseashouse/delete_all');

                Route::resource('overseasadviser','Overseasadviser');  //海外顾问
                Route::post('overseasadviser/delete_all','Overseasadviser/delete_all');

                Route::resource('housebroker','Housebroker');  //经纪人管理
                Route::post('housebroker/delete_all','housebroker/delete_all');

                Route::resource('houselabel','Houselabel');  //标签管理
                Route::post('houselabel/delete_all','Houselabel/delete_all');

                Route::resource('appuser','Appuser'); //用户管理

                Route::resource('housecoupon','Housecoupon'); //优惠券管理
                Route::post('housecoupon/delete_all','Housecoupon/delete_all');

                Route::resource('appuserreal','Appuserreal'); //实名认证管理
                Route::post('appuserreal/delete_all','Appuserreal/delete_all');

                Route::resource('appusercomment','Appusercomment'); //用户反馈管理
                Route::post('appusercomment/delete_all','appusercomment/delete_all');

                Route::resource('appusercoupon','Appusercoupon'); //已领取优惠券管理
                Route::post('appusercoupon/delete_all','Appusercoupon/delete_all');

                Route::resource('appusersellers','Appusersellers'); //用户卖房
                Route::post('appusersellers/delete_all','Appusersellers/delete_all');

                Route::resource('appuserrentout','Appuserrentout'); //用户出租
                Route::post('appuserrentout/delete_all','Appuserrentout/delete_all');

                Route::resource('storeappointment','Storeappointment'); //店铺预约
                Route::post('storeappointment/delete_all','Storeappointment/delete_all');

                Route::rule('systemsettings/index','Systemsettings/index');
                Route::rule('systemsettings/house_module','Systemsettings/house_module');


                Route::get('readAudio','Index/readAudio');

            })->middleware('CheckAuth');
        })->middleware('CheckLogin');
        
    })->prefix('backstage/');

//});